$(function() {
	$('#vue_vm_list div').hide();
});

var elderBeHospital_new = {
	beHospitalId: '',
	elderId: '',
	subjectRoomId: getLoginedUser().subjectRoomId,
	subjectRoomName: getLoginedUser().subjectRoomName,
	houseTypeId: '',
	houseTypeName: '',
	userVipCardId: '',
	vipCardRelation: '',
	buildingId: '',
	buildingName: '',
	floorId: '',
	floorName: '',
	roomId: '',
	roomNumber: '',
	roomType: '',
	bedId: '',
	bedNumber: '',
	nursingCostId: '',
	nursingDesc: '',
	baseServiceCostId: '',
	baseServiceDesc: '',
	createTime: '',
	updateTime: '',
	createId: getLoginedUser()? getLoginedUser().staffId: '',
	updateId: getLoginedUser()? getLoginedUser().staffId: '',
	createName: getLoginedUser()? getLoginedUser().staffName: '',
	updateName: getLoginedUser()? getLoginedUser().staffName: '',
	houseTypeType: '',
	beType: '',
	bedStatus: '',
};

var view = {
	data: elderBeHospital_new
};

function turnRoom() {
	if(isEmpty(elderBeHospital.isDetail) || elderBeHospital.isDetail=='no') {
		alert('请选择长者，并点击【确定】按钮');
		return;
	}
	
	view.data.createName = getLoginedUser()? getLoginedUser().staffName: '';
	
	if(confirm('确定要转房吗？')) {
		save_basic(path+'/elderBeHospital/turnRoom', {elderBeHospital:view.data}, function(response) {
			alert('转房成功');
			window.open('6-2-2zhuanfan-1.html?pageParam='+encodeURIComponent(JSON.stringify(view.data)));
		});
	}
}
